import axios from "@/utils/http";
enum Api {
    pointInfo = "/v1/pointInfo",
}


export interface Points {
    updateTime: string;
    uUID: string;
    // 操作人uuid
    operateUserUUID: string;
    // 被操作用户uuid
    userUUID: string;
    // 积分
    point: number;
    // 积分方式 1: 增加 2: 减少
    pointWay: number;
    // 积分信息
    pointInformation: string;
    // 房间uuid
    pointRoom: string;
    // 礼物uuid
    giftUUID: string;
}

export interface PintsList {
    list: Points[];
    total: number;
}
export interface ListParmas {
    page?: number;
    pageSize?: number;
    keyword: string;
}

// 获取积分列表
export const  List = (params: ListParmas) => {
    return axios.get<PintsList>(Api.pointInfo,params);
  };

// 获取积分详情
export const  details = (uuid: string) => {
    return axios.get<Points>(Api.pointInfo + "/" + uuid);
  };

// 更新积分
export const  Update = (params: Points) => {
    return axios.put(Api.pointInfo, params);
  };

// 删除积分
export const  Delete = (uuid:string) => {
    return axios.delete(Api.pointInfo+ "/" + uuid);
  };

// 创建积分
export const  Create = (params: Points) => {
    return axios.post(Api.pointInfo, params);
  };